package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.ApiToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

/**
 * @author: JamesZY
 * @date: 2021/9/7
 * @description:
 */
public interface ApiTokenDao extends JpaRepository<ApiToken, Long>, QuerydslPredicateExecutor<ApiToken> {

    @Query(value = "select * from wwyt_api_token where APPID = ?1 limit 1",nativeQuery = true)
    ApiToken findByAppId(String appId);
}
